<?php
class Integral_log_countrankAction extends IntesysAction {
	function index(){
		$this->initView();
        $this->dao = D('Member');
        $integral_logDB=D('Integral_log');
		$map=$integral_logDB->filter();
		
		$join=['left join __INTEGRAL_LOG__ r on r.rewarder_id=m.id','left join __MEMBER_GROUP__ g on g.id=m.group_id','left join __MEMBER_GROUP__ g2 on g2.id=g.pid'];
		$field='m.name,sum(r.changenum) as totalnum,count(r.member_id) as countnum,g2.title as groupname,m.id';
		$sort='totalnum desc';
		//$this->dao->_listGroup($this->view,$join,$field,$map,$sort);
	   
       //获取 筛选或添加 所需的部门等数据
       $this->assign('grouplist',D('Member_group')->getGroup());
	   
	   if($_POST['requestType']==10001011){
           //die(json_encode(array('log'=>$list,'statu'=>1)));
       }else{
           $this->display();    
       }
	}
}

